<template>
  <img :src="mySrc" :alt="alt" @load="handleLoad" @error="handleError">
</template>

<script>
  import XImg from './XImg'
  export default {
    props: {
      ...XImg.props,
      defaultSrc: {
        type: String,
        default: '/static/images/default_photo.jpg'
      }
    },
    computed: {
      mySrc () {
        return this.src || this.defaultSrc
      }
    },
    methods: {
      ...XImg.methods
    }
  }
</script>

<style lang="scss">
    @import '~styles/var.scss';
</style>
